<?php
    include "base.php";

    $sql = "SELECT * FROM `user`";

    $res = $conn->query($sql);

    $arr = array();

    while ($row = mysqli_fetch_assoc($res)) {
        array_push($arr, $row);
    }

    echo json_encode($arr);
    
?>